/*
 *  Copyright 2016 http://www.kedacomframework.org
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package com.kedacom.ctsp.authority.service;


import com.kedacom.ctsp.authority.dto.PersonImportDTO;
import com.kedacom.ctsp.authority.entity.Person;
import com.kedacom.ctsp.authority.vo.AuthorityImportExcelResultVo;
import com.kedacom.ctsp.web.service.CrudService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 人员 服务类
 *
 * @author
 */
public interface PersonService extends CrudService<Person, String> {

    /**
     * 根据人员编码查询
     *
     * @param code
     * @return
     */
    Person selectByCode(String code);

    /**
     * 导入人员
     *
     * @param dtos
     * @return
     */
    List<? extends PersonImportDTO> importPerson(List<? extends PersonImportDTO> dtos);


    AuthorityImportExcelResultVo importPerson(MultipartFile file, HttpServletRequest request) throws Exception;

    /**
     * 根据部门编号，获取部门下的人员id
     * @param deptCode
     * @return
     */
    List<String> getPersonIdsByDeptCode(String deptCode);

    String getUserIdByPersonId(String personId);
}
